package cn.melonlib.cores.identification.comp.messenger.impl;

import cn.melonlib.cores.identification.comp.messenger.OrganizationManager;
import cn.melonlib.cores.identification.model.entity.Organization;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;

@Component
@ConditionalOnProperty(value = "security.auth.mode",havingValue = "invented",matchIfMissing = true)
public class OrganizationManagerInvented implements OrganizationManager<String> {
    @Override
    public Organization<String> getOrganization() {
        return new IdentificationMessengerInvented.InventedOrganization();
    }

    @Override
    public String getCode() {
        return getOrganization().getCode();
    }
}
